﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Composite.Presentation.Regions;
using Microsoft.Practices.Unity;

namespace Infrastructure.WpfClient.Composite.Regions.ModalWindow
{
    public class ModalWindowRegionAdapter: RegionAdapterBase<DummyModalWindowContent>
        
    {
        [Dependency]
        public IUnityContainer Container { get; set; }
        public ModalWindowRegionAdapter(IRegionBehaviorFactory regionBehaviorFactory)
               : base(regionBehaviorFactory)
        {
            
        }
        
        protected override Microsoft.Practices.Composite.Regions.IRegion CreateRegion()
        {
            return Container.Resolve<ModalWindowRegion>();
        }

        protected override void Adapt(Microsoft.Practices.Composite.Regions.IRegion region, DummyModalWindowContent regionTarget)
        { 
            region.Views.CollectionChanged += (sender , e)=>
            {
                
            };
        }
    }
}
